package com.qckj.quartz.task;

import com.qckj.amz.service.impl.ProductAmzUploadTaskServiceImpl;
import com.qckj.common.core.domain.AjaxResult;
import com.qckj.quartz.service.impl.UploadFeedsReportServiceImpl;
import com.qckj.quartz.service.impl.UploadFeedsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 亚马逊定时任务相关
 *
 * @author luchuan
 * @version v1.0
 * @date 2022/11/27 0027
 **/

@Component("amzTask")
public class AmzTask {
    @Autowired
    private UploadFeedsServiceImpl uploadFeedsService;
    @Autowired
    private UploadFeedsReportServiceImpl uploadFeedsReportService;
    @Autowired
    private ProductAmzUploadTaskServiceImpl productAmzUploadTaskService;

    /**
     * 执行上传Feeds任务
     */
    public void uploadFeeds(){

        System.out.println("执行产品上传executeUploadFeeds---开始----");

        //在定时任务模块，service中新建上传任务实现类方法，进一步实现产品上传，即可
        AjaxResult res = uploadFeedsService.uploadFeeds();

        System.out.println("执行产品上传executeUploadFeeds---结束----");

    }

    /**
     * 获取上传报告
     */
    public void getUploadFeedsReport(){

        System.out.println("执行产品上传getUploadFeedsReport---开始----");

        AjaxResult res = uploadFeedsReportService.getUploadFeedsReport();

        System.out.println("执行产品上传getUploadFeedsReport---结束----");

    }


}
